﻿@using Orchard.Core.Routable.Models
@using Orchard.ContentManagement.ViewModels
@using Orchard.ContentManagement
@using Orchard.Core.Common.Models
@using SampleSiteModule.Models

@{
	Style.Require("Synopsis");
	var synopsisText = (Model.Synopsis.ToString()).Replace("\n", "</p><p>");
	var thumbnailUrl = Model.Thumbnail == null ? "" : Model.Thumbnail;	
}

@if (String.IsNullOrEmpty(thumbnailUrl))
{
	<div>
		<p>@Html.Raw(synopsisText)</p>
	</div>
}
else
{
	<div class="synopsis-container">
		<div class="synopsis-text">
			<p>@Html.Raw(synopsisText)</p>
		</div>
	</div>
	<div class="synopsis-thumbnail">
		<img src="@thumbnailUrl" width="150" height="150"/>
	</div>
	<div class="synopsis-clear"></div>
}